package com.openbravo.pos.panels.link;

import cn.ekuma.epos.datalogic.I_DataLogicSales;
import com.openbravo.bean.Product;
import com.openbravo.data.basic.BasicException;
import com.openbravo.data.gui.MessageInf;
import com.openbravo.pos.panels.model.ProductTableModel;

public class JBomProductForIncludePanel extends AbstractProductSelectTablePanel<Product> {

	public JBomProductForIncludePanel(I_DataLogicSales dlSales) {
		super(dlSales, new ProductTableModel());
	}

	
	@Override
	public void baseBeanChanged(Product o) {
		try {
			tableModel.resert(dlSales.getBomProductForIncludeListById(this.baseBeanID));
	} catch (BasicException e) {
		new MessageInf(e).show(this);
        tableModel.resert(null);
	}	
	}

	@Override
	public String getProductId(Product obj) {
		return obj.getID();
	}

}
